package com.icxx.learn.controller;

import com.icxx.learn.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * The type Feign controller.
 *
 * @author icxx
 * @version 1.0
 * @date 2019 -02-17 11:48:08
 */
@RestController
public class FeignController {
    /**
     * The Feign service.
     */
    @Autowired
    FeignService feignService;

    /**
     * Hi string.
     *
     * @param name
     * @return the string
     */
    @GetMapping(value = "/feign")
    public String hi(@RequestParam String name) {
        return feignService.sayHelloByFeign(name);
    }
}
